<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查询水果的价格案例</title>
    <script>
        var fruit = prompt('请您输入查询的水果:');
        switch (fruit){
            case '苹果':
                alert('苹果的价格是 3.5/斤');
                break;
            case '榴莲':
                alert('榴莲的价格是 35/斤');
                break;
            case '香梨':
                alert('香梨的价格是3/斤');
                break;
            default:
                alert('没有此水果');
        }

    </script>
</head>
<body>

</body>
</html>